<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>轮播图</title>
    <style>
        * {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .view {
            width: 300px;
            height: 300px;
            /* border: 1px solid red; */
            margin: 100px auto;
            overflow: hidden;
        }
        ul {
            width: 900px;
            /* 引用动画 */
            /* animation-name: lunbo;
            animation-duration: 3s;
            animation-timing-function: steps(3);
            animation-iteration-count: infinite; */
            animation: lunbo 3s steps(3) infinite;
        }
        ul li {
            float: left;
        }
        li img {
            width: 300px;
            height: 300px;
        }

        /* 动画 */
        @keyframes lunbo {
            from {
                margin-left: 0;
            }
            to {
                margin-left: -900px;
            }
        }
    </style>
</head>
<body>
    <div class="view">
        <ul>
            <li><img src="./img/01.jpg" alt=""></li>
            <li><img src="./img/02.jpg" alt=""></li>
            <li><img src="./img/03.jpg" alt=""></li>
        </ul>
    </div>
</body>
</html>